<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<%-- 页面标题栏 --%>
<div class="title">
	<s:a href="/admin/cityList.html" cssClass="parent fl"><s:text name="admin.cityList.title" /></s:a>
	<s:label cssClass="parent fl"  value=">" />
	<s:label cssClass="current fl" key="admin.districtList.title" />
	<s:a href="/admin/cityList.html" cssClass="back fr">[<s:text name="common.button.back" />]</s:a>
	<div class="clear"></div>
	<hr class="title" />
</div>
<div class="clear titleMessage">
	<s:actionmessage cssClass="fl" />
	<s:form action="/admin/districtList.html" cssClass="fr" method="post" theme="simple">
		<s:hidden name="cityId" />
		<s:label key="admin.districtList.localDistrictName" cssClass="tar vac plr" cssStyle="color: black;" />
		<s:textfield name="localDistrictName" cssClass="sti vac" />
		<s:label key="common.label.status" cssClass="tar vac plr" cssStyle="color: black;" />
		<s:select name="statusId" list="statusList" listKey="id" listValue="name" cssClass="sts vac w200" theme="simple" />
		<s:submit  key="common.button.search" cssClass="smallbtn1 tac vac plr" />
	</s:form>
</div>

<%-- 表格 --%>
<div class="clear table">
	<%-- 表格标题栏 --%>
	<div class="row">
		<div class="cell-table-header" style="width: 60px;">
			<s:text name="admin.districtList.districtId" />
		</div>
		<div class="cell-table-header" style="width: 80px;">
			<s:text name="admin.districtList.districtName" />
		</div>
		<div class="cell-table-header" style="width: 100px;">
			<s:text name="admin.districtList.localDistrictName" />
		</div>
		<div class="cell-table-header" style="width: 100px;">
			<s:text name="admin.districtList.localCityName" />
		</div>
		<div class="cell-table-header" style="width: 60px;">
			<s:text name="admin.districtList.status" />
		</div>
		<div class="cell-table-header" style="width: 80px;">
			<s:text name="admin.districtList.streetCount" />
		</div>
		<div class="cell-table-header" style="width: 240px;">
			<s:text name="admin.districtList.description" />
		</div>
		<div class="cell-table-header" style="width: 120px;">
			<s:text name="common.label.operations" />
			<s:a action="districtAdd">
				[<s:text name="common.button.add" />]
				<s:param name="cityId" value="cityId"></s:param>
			</s:a>
		</div>
	</div>
	<%-- 循环显示列表 --%>
	<s:iterator value="districtDetailList" var="districtDetailBean">
		<div class="row">
			<div class="cell-border tar">
				<s:property value="#districtDetailBean.districtId" />
			</div>
			<div class="cell-border">
				<s:property value="#districtDetailBean.districtName" />
			</div>
			<div class="cell-border">
				<s:property value="#districtDetailBean.localDistrictName" />
			</div>
			<div class="cell-border">
				<s:property value="#districtDetailBean.localCityName" />
			</div>
			<div class="cell-border tac">
				<s:if test="#districtDetailBean.statusId == 1">
					<s:text name="common.status.value1" />
				</s:if>
				<s:else>
					<s:text name="common.status.value0" />
				</s:else>
			</div>
			<div class="cell-border tac">
				<s:a action="streetList">
					<s:text name="#districtDetailBean.streetCount" />
					<s:param name="districtId" value="#districtDetailBean.districtId"></s:param>
					<s:param name="cityId" value="#districtDetailBean.cityId"></s:param>
				</s:a>
			</div>
			<div class="cell-border">
				<s:property value="#districtDetailBean.description" />
			</div>
			<div class="cell-border tac">
				<s:if test="#districtDetailBean.statusId == 1">
					<s:a action="districtEdit">
						[<s:text name="common.button.edit" />]
						<s:param name="districtId" value="#districtDetailBean.districtId"></s:param>
						<s:param name="cityId" value="#districtDetailBean.cityId"></s:param>
					</s:a>
					<s:a action="districtDelete">
						[<s:text name="common.button.delete" />]
						<s:param name="districtId" value="#districtDetailBean.districtId"></s:param>
						<s:param name="cityId" value="#districtDetailBean.cityId"></s:param>
					</s:a>
				</s:if>
				<s:else>
					<s:a action="districtRevive">
						[<s:text name="common.button.revive" />]
						<s:param name="districtId" value="#districtDetailBean.districtId"></s:param>
						<s:param name="cityId" value="#districtDetailBean.cityId"></s:param>
					</s:a>
				</s:else>
			</div>
		</div>
	</s:iterator>
</div>